home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / gnu / djgpp / src / libgplus.5 / libio / stdio / popen.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-04  |  419 b   |  23 lines

  1. #include "libioP.h"
  2. #include <errno.h>
  3.  
  4. FILE *
  5. popen(command, mode)
  6.      const char *command; const char *mode;
  7. {
  8.   return _IO_popen(command, mode);
  9. }
  10.  
  11. int
  12. pclose(fp)
  13.      FILE *fp;
  14. {
  15. #if 0
  16.   /* Does not actually test that stream was created by popen(). Instead,
  17.      it depends on the filebuf::sys_close() virtual to Do The Right Thing. */
  18.   if (fp is not a proc_file)
  19.     return -1;
  20. #endif
  21.   return _IO_fclose(fp);
  22. }
  23.